<head>
<style>
/*
  === Warning ===

  This file intentionally contains special newline characters: \n \f \r \r\n
  Keep them when you move the file between different OSes / file-systems
*/

/* Base form of the rule: */
#a { background-color: green; }
#b { b\61 C\06bG\0052o\00075n\000064-col\6Fr: green; }
#c { b\61	c\6b
g\72o\75n\64
-color:green }
#d { background-colo\0000072: green; /* Invalid: too many hex characters. */}
#e { b\61ckground-color: green; /* Invalid: \0b is not a newline character. */}
</style>

<script>

function runTest()
{
    if (window.testRunner)
        testRunner.dumpAsText();

    var rules = document.styleSheets[0].cssRules;
    var text = "";
    for (var i = 0; i < rules.length; i++) {
        text += rules.item(i).cssText;
        text += "\n";
    }

    document.getElementById("result").appendChild(document.createTextNode(text));

    if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data)
        document.getElementById("message").firstChild.data = "SUCCESS";
    else
        document.getElementById("message").firstChild.data = "FAILURE";
}

</script>

</head>

<body onload="runTest()">

<p>Test parsing of CSS escapes.</p>

<p id="message">TEST DID NOT COMPLETE</p>

<p>Rules from the stylesheet:</p>

<pre id="result"></pre>

<p>Expected result:</p>

<pre id="expected">#a { background-color: green; }
#b { background-color: green; }
#c { background-color: green; }
#d { }
#e { }
</pre>

<script>

</script>
</body>
